package Proxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

public class Test {
    public static void main(String[] args) {
        AdminService adminService=new AdminServiceImpl();
        InvocationHandler invocationHandler=new AdminServiceProxy2(adminService);
        AdminService adminService1= (AdminService) Proxy.newProxyInstance(invocationHandler.getClass().getClassLoader(),
                AdminServiceImpl.class.getInterfaces(),invocationHandler);
        adminService1.load();
    }
}
